﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Activities;
using System.ComponentModel;
using iopt.solvency.pillarone.client.generated;
using iopt.solvency.pillarone.core;

namespace iopt.solvency.pillarone.components.customs
{
    /// <summary>
    /// Entity Component
    /// </summary>
    public class SampleComponent : IComponent
    {
        public IInputArgument<double> TimeSpan { get; private set; }
        public IOutputArgument<DateTime> FinalTime { get; private set; }

        public bool TimeSpanInSeconds { get; set; }

        public void Execute(IComputeContext ComputeContext, IDataContext DataContext)
        {
            this.FinalTime.Set(
                System.DateTime.Now +
                System.TimeSpan.FromMilliseconds(this.TimeSpan.Get()));
        }
    }
}
